<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<div class="span10">
    <h1 class="page-header">Cập nhật thông tin cá nhân</h1>
    <?php if (Yii::app()->user->hasFlash('error')): ?>
        <div class="alert alert-error fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <?php echo Yii::app()->user->getFlash('error') ?>
        </div>
    <?php endif; ?>
    <?php if (Yii::app()->user->hasFlash('success')): ?>
        <div class="alert alert-success fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <?php echo Yii::app()->user->getFlash('success') ?>
        </div>
    <?php endif; ?>
    <?php
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
        'type' => 'vertical',
        'id' => 'profile-form',
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
        'htmlOptions' => array(
            'class' => 'form-horizontal'
        )
    ));
    ?>
    <div class="control-group">
        <label class="control-label">Họ và tên</label>

        <div class="controls">
            <?php echo $form->textField($model, 'fullname', array('class' => 'span12')) ?>
            <?php echo $form->error($model, 'fullname', array('class' => 'error-message')); ?>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Email</label>

        <div class="controls">
            <?php echo $form->textField($model, 'email', array('class' => 'span12', 'disabled' => true)) ?>
            <?php echo $form->error($model, 'email', array('class' => 'error-message')); ?>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Số điện thoại</label>

        <div class="controls">
            <?php echo $form->textField($model, 'phone', array('class' => 'span12')) ?>
            <?php echo $form->error($model, 'phone', array('class' => 'error-message')); ?>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Địa chỉ</label>

        <div class="controls">
            <?php echo $form->textArea($model, 'address', array('class' => 'span12')) ?>
            <?php echo $form->error($model, 'address', array('class' => 'error-message')); ?>
        </div>
    </div>
    <div class="form-actions">
        <button id="save-user" type="submit" class="btn btn-primary">Lưu</button>
    </div>
    <?php $this->endWidget(); ?>
</div>

